
<section id="content">

    <div class="page page-fullwidth-layout">

        <div class="pageheader">

            <div class="page-bar">

                <ul class="page-breadcrumb">
                    <li>
                        <a href="{:url('/admin')}"><i class="fa fa-home"></i> 起始页</a>
                    </li>
                    <li>
                        <a href="#">所有拍品</a>
                    </li>
                </ul>

            </div>
        </div>
        <!-- page content -->
        <div class="pagecontent">

            <!-- row -->
            <div class="row">
                <!-- col -->
                <div class="col-md-12">
                    <!-- tile -->
                    <section class="tile">
                        <form action="{:url($data.module_url)}" style="padding-top: 10px;" class="navbar-form form-inline" method="post">
                            <div class="form-group">
                                <label class="control-label">商品名称</label>
                                <div class="input-group">
                                    <input type="text" class="form-control" name="goods_name" value="" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label">手机号码</label>
                                <div class="input-group">
                                    <input type="text" class="form-control" name="mobile" value="" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label">时间范围</label>
                                <div class="input-group">
                                    <input type="text" name="startTime" class="Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',readOnly:true})"  style="width:150px;padding: 16px;border: 1px solid #dbe0e2;" />至
                                    <input type="text" name="endTime" class="Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',readOnly:true})"  style="width:150px;padding: 16px;border: 1px solid #dbe0e2;" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label">状态</label>
                                <div class="input-group">
                                    <select name="up_down" class="form-control">
                                        <option value="0">请选择</option>
                                        <option value="1">上架中</option>
                                        <option value="2">下架中</option>
                                    </select>

                                </div>
                            </div>

                            <div class="form-group">
                                <button type="submit" class="btn btn-primary pull-right"><i class="fa fa-search"></i> 查詢</button>
                            </div>
                        </form>
                        <!-- tile body -->
                        <div class="tile-body">
                            <div class="alert alert-info" style="display:none;">显示一些提示信息</div>

                            <div class="table-responsive">
                                <table class="table table-striped table-hover table-custom" id="products-list">
                                    <thead>
                                    <tr>
                                        <th>编号</th>
                                        <th>微信昵称</th>
                                        <th>手机号码</th>
                                        <th>性别</th>
                                        <th>微信头像</th>
                                        <th>商品名称</th>
                                        <th>点击量</th>
                                        <th>价格(￥)</th>
                                        <th>上架时间</th>
                                        <th>下架时间</th>
                                        <th>是否购买</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {volist name='allproduct' id='list'}
                                    <tr>
                                        <td>{$list.goods_id}</td>
                                        <td>{$list.nickname}</td>
                                        <td>{$list.mobile}</td>
                                        <td>
                                            {if condition='$list.sex' eq 1}
                                                男
                                            {elseif condition='$list.sex' eq 2}
                                                女
                                            {else/}
                                                保密
                                            {/if}
                                        </td>
                                        <td>
                                            <img src="{$list.head_pic}" width="40" height="40" style="border-radius: 50%;">
                                        </td>
                                        <td>{$list.goods_name}</td>
                                        <td>{$list.click_count}</td>
                                        <td>{$list.shop_price}</td>
                                        <td>{$list.upload_time|date='Y-m-d H:i:s',###}</td>
                                        <td>{$list.endTime|date='Y-m-d H:i:s',###}</td>
                                        <td>
                                            {if condition='$list.goods_status eq 1'}
                                                未被购买
                                            {else/}
                                                已被购买
                                            {/if}
                                        </td>
                                        <td>
                                            {if condition="$list.endTime gt time()"}
                                                上架中
                                            {else}
                                                下架中
                                            {/if}
                                        </td>
                                        <td>
                                            <a class="btn btn-info" href="{:url($data.module_url.'productDetail',['goods_id'=>$list['goods_id']])}">
                                                <i class="glyphicon glyphicon-edit icon-white"></i>
                                                商品详情
                                            </a>
                                        </td>
                                    </tr>
                                    {/volist}

                                    </tbody>
                                </table>
                            </div>
                            <div class="text-center">{$allproduct->render()}</div>
                        </div>
                        <!-- /tile body -->

                    </section>
                    <!-- /tile -->

                </div>
                <!-- /col -->
            </div>
            <!-- /row -->
        </div>
        <!-- /page content -->
        <script type="text/javascript">
            function deleteData(follow_id){
                $.ajax({
                    type:"get",
                    data: {'follow_id':follow_id},
                    url:"{'')}",
                    success:function(data){
                        if(data.error == 0){
                            $('#tr_'+data.follow_id).remove();
                        }
                        $('.alert').html(data.msg).show();
                        setTimeout(function() {
                            $('.alert').hide();
                        }, 3000);
                    },
                    error:function(data){

                    }
                });
            }


            function checkform(){
                var follow_time = document.getElementById("follow_time").value;
                var remark = document.getElementById("remark").value;
                if(!follow_time){
                    alert("跟进时间不能为空");
                    return false;
                }
                if(!remark){
                    alert("备注不能为空");
                    return false;
                }
                document.getElementById("myform").submit();
            }

        </script>
    </div>
</section>
<!--/ CONTENT -->


